package com.yyp.car.service;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.yyp.car.Idao.ISchoolDao;
import com.yyp.car.Iservice.ISchoolService;
import com.yyp.car.model.School;

@Service("schoolService")
public class SchoolService implements ISchoolService{
	@Resource(name="schoolDao")
	private ISchoolDao schoolDao;

	@Override
	public List<School> listSchool() {
		return schoolDao.listSchool();
	}
	
	@Override
	public School addSchool(School school) {
		return (School)schoolDao.add(school);
	}

	@Override
	public void updateSchool(School school) {
		schoolDao.update(school);
	}

	@Override
	public School load(int id) {
		return schoolDao.load(id);
	}

	@Override
	public void delete(int id) {
		schoolDao.delete(id);
	}

}
